package org.example.edusmart.controller.Teacher;

import jakarta.servlet.http.HttpServletRequest;
import org.example.edusmart.pojo.CourseDirectoryPojo;
import org.example.edusmart.pojo.CoursePojo;
import org.example.edusmart.pojo.UserPojo;
import org.example.edusmart.request.TeaOrStu.CourseGradePOjo;
import org.example.edusmart.request.TeaOrStu.UserIdPojo;
import org.example.edusmart.service.CourseService;
import org.example.edusmart.service.UserService;
import org.example.edusmart.utils.AliOSSUtil;
import org.example.edusmart.utils.GetTokenInfo;
import org.example.edusmart.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.time.LocalDateTime;

/**
 * 教师进行学生管理
 */
@RestController
@RequestMapping("/TeacherStudent")
public class TeaStudentController {

    @Autowired
    private UserService userService;

    /**
     * 查看学生信息
     */
    @PostMapping("/getStuInformation/")
    @PreAuthorize("hasAuthority('public_permission')")
    public Result getStuInformation(@RequestBody UserIdPojo user) {
        String userId = String.valueOf(user.getUserId());
        UserPojo information = userService.getUserByUserId(userId);
        return new Result(information,202,"成功获取学生信息");
    }



    }
